package com.ranjiaqi.atomic;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @ClassName TestActomicInteger
 * @Description TODO
 * @Author hp
 * @Date 2021/6/30 18:52
 * @Version 1.0
 **/
public class TestAtomicInteger {
    static AtomicInteger atomicInteger = new AtomicInteger();
    public static void main(String[] args) {
        for (int i = 0; i < 50; i++) {
            int x = atomicInteger.incrementAndGet();
            System.out.println("x = " + x);
        }
    }
}
